package com.hzc.springchan;

import com.hzc.springchan.config.resthelp.RequestConcurrent;
import com.hzc.springchan.util.LogUtils;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;

@EnableAsync
@SpringBootApplication
@MapperScan(basePackages = "com.hzc.springchan.mapper")
public class SpringChanApplication {

    public SpringChanApplication(RequestConcurrent requestConcurrent) {
        requestConcurrent.log();
    }

    public static void main(String[] args) {
        Long startMillions = System.currentTimeMillis();
        SpringApplication.run(SpringChanApplication.class, args);
        LogUtils.info(SpringChanApplication.class, "=============website run success, take {}ms=============", System.currentTimeMillis() - startMillions);
    }

}
